import request, {headers} from '@/utils/request'
import qs from 'qs'

export default {
  clientOpen(host,port,reciveModel){return request.get('/tcp/client/open',{params:{host,port,reciveModel}})},
  clientClose(){return request.get('/tcp/client/close')},
  clientState(reciveModel){return request.get('/tcp/client/state',{params:{reciveModel}})},
  clientSendCommand(ascii,hex){return request.get('/tcp/client/sendCommand',{params:{ascii,hex}})},

  serverOpen(port,reciveModel){return request.get('/tcp/server/open',{params:{port,reciveModel}})},
  serverClose(){return request.get('/tcp/server/close')},
  serverState(reciveModel){return request.get('/tcp/server/state',{params:{reciveModel}})},
  serverSendCommand(ascii,hex){return request.get('/tcp/server/sendCommand',{params:{ascii,hex}})},
  clients(){return request.get('/tcp/server/clients')}
}
